﻿#

if ( ($IsWindows -eq $True) -or ($PSVersionTable.psversion.major -lt 6) ) #win
{
	$win空闲内存 = ((Get-Counter -counter "\memory\available MBytes").readings -split "`n")[1]
	return $win空闲内存
}

if ($IsLinux -eq $True)
{
	$Private:temp = free -m | Select-String 'Mem'
	$linux空闲内存 = ($Private:temp -split "\s+|\t+")[-1]
	#$linux空闲内存
	return $linux空闲内存
}




